-
Notifications
You must be signed in to change notification settings - Fork 75
Add move before #1474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add move before #1474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It works perfectly :)
Please also run gradlew apiDump
and commit the changes.
|
||
@Deprecated(DEPRECATED_ACCESS_API) | ||
@AccessApiOverload | ||
public fun <T, C> MoveClause<T, C>.before(column: AnyColumnReference): DataFrame<T> = before { column } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to add these deprecated overloads :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove them
return removeResult.df.insertImpl(toInsert) | ||
} | ||
|
||
// move target after last of toInsert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you expand this doc a bit? I have a bit of a hard time understanding the logic below.
so... you insert the removed columns after the target column in the first place, and then you move the target column after the removed/inserted columns?
That's... really clever :D
But it took me a while to get it :) so please expand the doc a tiny bit :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much, I appreciate it. That's exactly the logic. I'll try to make the doc more undesrtandable.
I implemented requested changes, In addition I noticed a bug when the function throws exception, so i fixed it. |
Solves issue #1021. It comes with a test case which is inspired by after's test case.